package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ywb
 * @since 2024-03-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tenant_fund_flows")
@ApiModel(value="TenantFundFlowsEntity对象", description="")
public class TenantFundFlowEntity implements Serializable {
    @ApiModelProperty(value = "租户收支明细ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "流水号")
    private String serialNumber;
    
    @ApiModelProperty(value = "收支类型：1 收入，2 支出")
    private Integer flowType;

    @ApiModelProperty(value = "交易类型：1 充值，2 出票")
    private Integer type;

    @ApiModelProperty(value = "交易金额")
    private BigDecimal amount;
    
    @TableField("\"desc\"")
    @ApiModelProperty(value = "交易描述")
    private String desc;

    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;
    
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createdAt;
    
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updatedAt;
    
    @TableField(select = false)
    @ApiModelProperty(value = "删除时间")
    @TableLogic(value = "null", delval = "now()")
    public LocalDateTime deletedAt;
}
